home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
pc_board
/
gift4b16.zip
/
GIFTEST.DOC
< prev
next >
Wrap
Text File
|
1992-09-26
|
28KB
|
536 lines
┌─┬────── ┬─┬ ┬─┬─────┐
│ │ │ │ │ │
│ │ ┌─┐ │ │ │ ├── ┌─┬┬─┐ ┬┬──┐ ┌┬──┐ ┌─┬┬─┐ ┬ ┬┬ ┌┬──┐
│ │ │ │ │ │ │ ││ │├─ └┴─┬┐ ││ └──┤│ ││ │
└─┴─────┘ ┴─┴ ┴─┴ ┴┴ ┴┴──┘ └──┴┘ ┴┴ ┴┴ o └┴──┘
CopyRight (C) 1991-92 by Max Bernard & Dave Navarro, Jr.
-----------------------------------------------------------------------------
What is GIFtest?
-----------------------------------------------------------------------------
GIFtest is a command line utility to test GIF files to make sure they are
valid. GIFtest scans the GIF header to make sure that all the information
stored is valid, and then scans the image it self to make sure it's all
there. If everything is found in order, GIFtest exits without any error
messages or error levels. However, if there is a problem with the GIF,
GIFtest exits with an error message letting you know what's wrong, and also
returns an error level identifying the problem. You can then use the error
level to branch to the proper section in your batch file.
-----------------------------------------------------------------------------
GIFtest features at-a-glance
-----------------------------------------------------------------------------
■ Test GIF files for header and image block integrity
■ Build a CRC database of all GIFs tested
■ Check each tested GIF against the database and report duplicate GIFs
even if the file has been renamed.
■ Detect and report presence of GIFlite header
■ Detect and trim any extra bytes left by older transfer protocols
■ Modify a BBS file description to include the resolution of the GIF
(ProDooor and PCBoard only for now)
■ Detect and extract embedded (GIFbrand or other) text in GIF89a files.
The extracted text is kept in an plain text file of your choosing.
■ Detect and use embedded GIFbrand file descriptions.
If a GIFbrand description is found, it used to replace the caller-provided
U/L file description, the same way ProDIZ and PCBDESC replace U/L des-
criptions with embedded FILE_ID.DIZ and DESC.SDI descriptions.
■ Forcing all GIFs to be private uploads on PCBoard and ProDoor systems,
and rejecting GIFs that do not meet a specified minimum resolution.
■ Detect and optionally remove Mac headers from GIF files (*).
■ Log result of the test to a default or user-specied log file.
-----------------------------------------------------------------------------
Registered Version
-----------------------------------------------------------------------------
The registered GIFtest package also includes the following utilities:
■ GTsetup: Registration utility that enables all the features of GIFtest,
brands your copy with your BBS's name, and removes any delays,
or nag screens. This is obviously only available upon regis-
tration.
■ GIFbrand: Lets you "brand" your original GIFs with any information you
want. Will also accepts up to 5 lines of 40 characters of text
to be embedded in the GIF. This text could be a file descrip-
tion, an ad for your BBS or business or anything else you want.
■ GIFstat: Statistics program that analyses your GIFtest log file and
displays a summary of all the information contained. SysOps
can redirect the output to a file for use as a bulletin on
their system.
■ GIFread: Read and display any description that has been branded
into a GIF file and display it along with a complete
analasys of the GIF. Includes support for GIF89a text
comment fields.
■ GIFstrip: Strips comments, and "extension" headers from GIF files
to reduce their size. Including GIFLITE header, secondary
images (multiple image GIFs), GIFbrand descriptions and text
comments, Mac headers, etc...
-----------------------------------------------------------------------------
C o m i n g A t t r a c t i o n s
-----------------------------------------------------------------------------
■ GIFlab (all the features of GIFtest + graphical display + more)
■ Optional removal of GIFlite header, if found
■ Support for JPEG files
■ Support for more BBS systems (if there's enough demand for it)
-----------------------------------------------------------------------------
Other Info
-----------------------------------------------------------------------------
When GIFs are transfered from user to user, or user to BBS or BBS to user,
their protocol sends files in packet sizes ranging from 128 bytes to 4k, and
when they reach the end of a file, if the remaining bytes do not equal the
packet size, the packet is "padded" with extra characters to make it equal to
the pack size. Unfortunately, these bytes are not trimmed off when recieved
by older protocols. It doesn't affect the file itself, but after several
hundred file transfers, you could end up with several hundred "K" of wasted
space. GIFtest now automatically trims these extra bytes from GIF files.
GIFtest also conforms 100% to the GIF87a and GIF89a standards, so will also
process GIFs that contain "extensions". These extensions are also tested to
make sure that all the "data blocks" have the correct lengths and are valid.
-----------------------------------------------------------------------------
How to use GIFtest
-----------------------------------------------------------------------------
GIFtest 4.0ß will accept the following options either from the command line
or the first line of the confige file (defaults to GIFTEST.CFG)
/A - Force private upload
/B:n - BBS type:
0 - None [default], 1 - ProDoor
2 - PCBoard, 3 - ProDoor 3.44+
/C:[CfgFile] - Use config options in 'CfgFile'
/D - Do duplicate checking using 32-bit CRCs
/E - Erase (DELete) Invalid GIFs
/F:FileName - Name of BBS Description file
/L:[LogFile] - Keep a log of tested GIFs in 'LogFile'
/M:HHxVVxCC - Minimum resolution and # of colors to accept
/N:n - Node Number (Requires config file)
/P:n - COM port numer [1 - 4] (i.e. /P:1 for COM1)
/R:n - Position of resolution in description
0 - First word on first line
1 - Last word on first line [default]
2 - Last word on last line
3 - Last line by itself
/S - Skip GIF testing; Get resolution info only
/T:n - Type of resolution format to use
1 - Full Rez with brackets [640x480x256]
2 - Full Rez no brackets 640x480x256
3 - Abbreviated Rez w/brkts [640x480]
4 - Abbreviated Rez no " 640x480
/U - Convert U/L description to uppercase
/X:filename - Extract text comments to 'filename'
Note: Options enclosed in [brackets] are not implemented yet.
To use GIFtest, just type "GIFTEST filename.gif" at the DOS prompt and
GIFtest will tell you the size of the GIF and whether or not it passed
testing.
GIFtest will also exit with one of the following Errorlevels to help you
identify what happened in batch files, or programs that use GIFtest (such as
ZipLab).
Result ErrorLevel
GIF passed all tests 0
Invalid Header or Incomplete Image 1
File Not Found 5
Invalid Command Line Option 5
GIFLITE'd [passed all other tests] 10
Failed Minumum Resolution [passed other tests] 20
Duplicate CRC found [passed other tests] 25
No Description Found [passed all other tests] 60
Unknown Error [programmer goofed] 255
-----------------------------------------------------------------------------
GIFtest command line and config file options reference
(in alphabetical order)
-----------------------------------------------------------------------------
--------------------------------------------------------------------
/A Making GIFs Private
--------------------------------------------------------------------
Example: /A
Sometimes, SysOps will have problems where users will upload adult GIFs to a
public file area. You can remedy this several different ways.. You can make
all uploads private, you can get nasty and delete the offending user(s), or
you can use GIFtest to force all GIFs to be private uploads, leaving the rest
of your files alone using the "/A" switch on the command line or in
GIFTEST.CFG..
WARNING! This only works with ProDoor and PCBoard systems which use GIFtest
to modify the description.
--------------------------------------------------------------------
/B:n Modifying U/L Descriptions
--------------------------------------------------------------------
Example: /B:3
The only feature of the original GIFtest was to place the resolution of the
GIF into the description typed by users of ProDoor where I wanted it. Since
then, many sysops have contacted me, asking that I allow the same time of
feature for their BBS type as well. Unfortunately, the only people to give
me the necessary information have been PCBoard SysOps, so starting with 4.0,
GIFtest supports descriptions for ProDoor and PCBoard.
However, GIFtest doesn't know which type of BBS is running. So you'll need
to tell it with the /B switch.
/B:0 Ignore ProDoor and PCboard descriptions, just test the GIF
/B:1 You're running ProDoor. Search for $DOOR.NAM to modify the
description
/B:2 You're running PCBoard. Search for UPDESC[.N] to modify the
description
/B:3 You're running ProDoor 3.44 dated after 12/31/91. Search for
$DOOR.NAM to modify the description
If you use the /B:n option and GIFtest does not find the description file or
does not find the description inside the description file for the GIF and the
GIF passes all tests, GIFtest will exit with ErrorLevel 40.
ProDoor Descriptions
--------------------
ProDoor stores the name and descriptions of uploaded files in a file called
$DOOR.NAM which is kept in the default directory for each node. For example,
if your PRODOOR batch file called ProDoor with the options PRODOOR PROD.CNF
C:\PCB, then $DOOR.NAM will be found in the directory C:\PCB. So, you can
call GIFtest with:
GIFTEST %1 /B:1 /F:C:\PCB\$DOOR.NAM
Which will tell GIFtest that the description file C:\PCB\$DOOR.NAM uses the
ProDoor format for storing descriptions.
PCBoard Descriptions
--------------------
PCBoard stores the name and descriptions of uploaded files in a file called
UPDESC[.n], where the [.n] is the node number if you are running a multinode
BBS. So node 1 would be UPDESC.1, node 2 is UPDESC.2, etc.. The location of
this file depends on how you have PCBOARD.DAT setup, if you have specified a
"work" directory in PCBSETUP, then this file is placed in that work
directory. If not, then it is kept im the default PCB directory for each
node. If you are using PCBoard 14.5a the easiest way to find the UPDESC[.n]
file for each node is to put
echo %3 > UPDESC.LOC
at the top of your PCBTEST.BAT file. This will echo the third parameter (the
name and location of the UPDESC[.n] file) to the file UPDESC.LOC which you
can then type to see where PCBoard is keeping it. This is only important for
you to know if you are running GIFtest from within a program like ZipLab. If
you are calling GIFtest directly from within your PCBTEST file, you need only
add the option "/F:%3" to the command line and PCBoard will pass the name and
location of the description file to GIFtest for you.
WARNING!: Do NOT use the name of any of your DIRx files, especially your
upload directory file, this will get DESTROYED.
--------------------------------------------------------------------
/C:[filename] Configuration File
--------------------------------------------------------------------
Example: /C:C:\UTILS\GIFTEST.CFG
Some programs like ZipLab shell out to GIFtest in order to test GIF
files...however, they may not allow you to include the defaults you want to
test the GIF with. To help with this, GIFTEST will let you store all your
defaults into a config file. The default name is GIFTEST.CFG, but you can
pass any filename on the command line with the "/C:[filename]" switch. If a
filename is not specified, then GIFTEST.CFG is assumed.
The top line of the configuration file is the DOS command line you want to
use for GIFtest. Each line after that is the name and location for the
description file for the BBS you run for each node.
Example:
/E/L ; Erase bad GIFs, Keep a log file
C:\PRO\NODE1\$DOOR.NAM ; location of description file for node 1
C:\PRO\NODE2\$DOOR.NAM ; location of description file for node 2
To get the current node number, GIFtest either expects it on the command line
[see /N], or expects to find the environment variable "PCBNODE=n" where "n"
is the node number.
--------------------------------------------------------------------
/D Checking for Duplicate GIF Files
--------------------------------------------------------------------
Example: /D
A major problem with GIFs today is that users will rename them and re-upload
them to a BBS to get upload credits. Before GIFtest, there was no way to
test if a file was actually a GIF, however, even if the file is a GIF, it
could be a duplicate file. To combat this, GIFtest calculates a 32bit CRC
for each uploaded GIF using the same method as PKZIP and ARJ and places that
CRC into your GIFLOG file (if you keep one). You can then use the "/D"
parameter to have GIFtest scan this log for a duplicate CRC and return an
errorlevel if one is found.
WARNING: GIFtest does NOT do duplicate checking by default, but it will log
all CRC's of complete GIFs if they pass testing. If you want dupe checking,
you must specifically ask for it using the /D switch either on the command
line or the first line of the config file.
--------------------------------------------------------------------
/E Erasing bad GIFs
--------------------------------------------------------------------
Example: /U
While GIFtest does exit with an ERRORLEVEL to indicate the failure of a GIF
to pass all tests, some users don't with to catch these errors in a BATch
file to see if the file needs to be deleted.
The /E option will erase any GIF not passing all of the tests.
If GIFtest is unable to erase the GIF, it will exit with ERRORLEVEL set to
255.
--------------------------------------------------------------------
/F:filename Passing the description filename
--------------------------------------------------------------------
Example: /F:U:\LOGS\GIFTEST.LOG
You can use the "/F:filename" parameter to pass the name and location of the
description file for GIFtest to alter. This is especially useful with
PCBoard 14.5a multi-node systems where you are calling GIFtest directly from
PCBTEST.BAT and can pass the %3 parameter from PCBoard directly to GIFtest,
such as:
GIFTEST %1 /B:2 /F:%3
WARNING!: This only works with PCBoard and ProDoor descriptions.
--------------------------------------------------------------------
/L:[logfilename] Log all checked GIFs
--------------------------------------------------------------------
Example: /D
GIFtest can log all tested GIFs to a file which can help you in tracking
duplicates, resolutions, and user activities. If you don't specify a
filename, the name GIFLOG is used.
--------------------------------------------------------------------
/M:HHxVVxCC Minimum resolution and # of colors
--------------------------------------------------------------------
Example: /M:640x480x256
HH, VV and CC are the minimum Horizontal and Vertical resolution and number
of colors respectively, a GIF must have in order to be accepted on your
system. If the resolution is less than the specified minimum for either HH,
VV or CC, GIFtest will reject the file and return and return an appropriate
error level and error message.
--------------------------------------------------------------------
/N:n Node number (for multi-node systems)
--------------------------------------------------------------------
Example: /N:2 Node 2
When using GIFtest on a multi-node system, it's not necessary to have a
separate copy of GIFTEST.EXE and GIFTEST.CFG for each node. You can use a
single copy of each if you have SHARE.EXE loaded and the above 2 files in a
location that's accessible to all the nodes. It also helps to make the EXE
file "Read Only".
In order for GIFtest to function properly in such a setup, it is necessary
for it to know which node it is being invoked from. You specify the node
number in one of two ways. 1) using the /N switch (see example above) on the
command line or in the config file. 2) using the environment variable NODE
(i.e. SET NODE=x where x is the node number). This allows GIFtest to find
the location of the U/L description file in the config file.
--------------------------------------------------------------------
/P:n COMM port number
--------------------------------------------------------------------
Example: /P:2 Use COMM port 2
GIFtest currently supports standard COMM ports 1 through 4. Support for
non-standard COMM port addresses and IRQs will be added in future versions.
--------------------------------------------------------------------
/R:n Position of resolution in description
--------------------------------------------------------------------
Example: /R:3 Puts the resolution as last word on last line
This switch lets you specify where GIFtest will put the resolution info in
the modified U/L description. The following options are available:
/R:0 - First word on first line
/R:1 - Last word on first line [default]
/R:2 - Last word on last line
/R:3 - Last line by itself
--------------------------------------------------------------------
/S Skip GIF testing
--------------------------------------------------------------------
Example: /S
This switch instructs GIFtest to not perform any tests on the GIF file. Only
the GIF header is read to extract the resolution and color info, so it can be
added to the U/L file description.
--------------------------------------------------------------------
/T:n Type of resolution format to use
--------------------------------------------------------------------
Example: /T:2 Full res info, No brackets
This switch lets you tell GIFtest your format preference for the resolution
information that is added to the modified U/L file description. There are
4 possible values for this switch. Values 1 and 2 produce full resolution
information, with or without brackets respectively. Values 3 and 4 produce
an abbreviated form of the resolution information, with or without brackets
respectively. Below are the possible switch settings and sample output:
Switch Description Example output
------ ---------------------- ---------------------------------------
/T:1 Full rez with brackets [640x480x256], [1024x768x256] (default)
/T:2 Full rez No brackets 640x480x256 , 1024x768x256
/T:3 Abbr rez with brackets [640x480] , [1Kx768] (*NEW*)
/T:4 Abbr rez No brackets 640x480 , 1Kx768 (*NEW*)
GIFtest tries to eliminate redundant resolution information while assuming
some reasonable defaults. Since most GIFs are of the 256 color variety,
GIFtest will not add 'x256' to the description if the image being tested is
actually a 256-color picture. The second type of optimization performed is
on the horizontal resolution field. If the image measures 1024x768x256, the
'1024' is abbreviated as '1K'. So [1024x768x256] becomes [1Kx768].
--------------------------------------------------------------------
/U Convert description to uppercase
--------------------------------------------------------------------
Example: /U
If the /U switch is present on the command line, GIFtest will convert the U/L
file description to ALL UPPER CASE.
--------------------------------------------------------------------
/X:FileName Log text comments to 'filename'
--------------------------------------------------------------------
Example: /X:U:\LOGS\GIFTEST.CMT
This switch tell GIFtest to log any embedded text found in the GIF file in
the specied text file.
-----------------------------------------------------------------------------
---------
N o t e
---------
Any options found in the command line take precedence over config file
parameters. If you have /B:0 in the config, but GIFtest finds a /B:1 in the
command line, then GIFtest will use the /B:1 option. Think of the con fig
file as a place to keep your default parameters. Those can always be
overriden using the command line.
-----------------------------------------------------------------------------
The format for the log file is:
FILENAME.GIF 999999 01-01-91 [9999xx9999x999] 9999 OK GL FFFFFFFF
─────┬────── ──┬─── ────┬─── ────────┬─────── ─┬── ┌─ ┌─ ┌───────
│ │ │ │ │ │ │ └ 32 bit CRC
│ │ │ │ │ │ └ GIFLITE'd
│ │ │ │ │ └ Status
│ │ │ │ │ OK
│ │ │ │ │ IM Incomplete Image
│ │ │ │ │ IV Invalid Header
│ │ │ │ └ Trimmed Bytes
│ │ │ └ Resolution
│ │ └ Current Date
│ └ File Size
└ File Name
-----------------------------------------------------------------------------
Using GTSETUP to register your copy of GIFtest
-----------------------------------------------------------------------------
GTsetup is a utility that comes bundled with GIFtest and allows you to
register your copy of GIFtest (and othe programs in the package) after you
have received your registration number. The command line syntax for GTsetup
is quite simple.
If no arguments are provided on the command line, GTsetup defaults to
creating a GIFtest config file for you. It will prompt you for all the
needed information and then proceed to write a GIFTEST.CFG file for you,
using the answers you provided.
Typing 'GTsetup REG' puts GTsetup in the registration mode of operation. In
this mode, GTsetup will prompt you for the name of the program file you want
to register, followed by your "Registered Name" and your registration number.
The ""Registered Name" is the name you gave us when you applied for a
registration number. It must be entered exactly the same way it was given to
us or the registration process will fail. NOTE that the "Registered Name" is
case sensitive, meaning that upper and lower case letters have different
meanings.
You can also type 'GTsetup REG GIFTEST.EXE' for instance to register GIFtest.
In that case, you will only be prompted for your "Registered Name" and
registration number.
Here are some examples:
GTsetup GTSETUP helps you create a GIFtest config file. You are
prompted for all need information.
GTsetup REG You are prompted for the name of the program you wish to
register as well as your registration information.
GTsetup REG x Lets you register x where x is the name of one of the programs
in the GIFtest package (such as GIFbrand, GIFstat, GIFstrip).
-----------------------------------------------------------------------------
Acknowledgements
-----------------------------------------------------------------------------
The Graphics Interchange Format(c) is the Copyright property of Compuserve
Incorporated. GIF(sm) is a Service Mark property of Compuserve Incorporated.
Many thanks to the following individuals who have helped with the testing of
GIFtest and whose suggestions have helped GIFtest to grow:
Max Bernard SysOp of TASTE BBS
Thomas Enstall SysOp of Hard Times BBS
Gary Foreman SysOp of Another Dimension BBS
Allen Legatzke SysOp of Sattelite BBS
Jeffrey Morley Author of ZipLab
Steve Rimmer Author of "Bit-Mapped Graphics"
Samuel Smith Author of ProDoor, ProLogon, etc
Chuck Valececk SysOp of Suburban Software BBS
-----------------------------------------------------------------------------
S u p p o r t
-----------------------------------------------------------------------------
The author can be reached through US Mail at the same address used for
registration, or through "electronic mail" left on The TASTE BBS at
718-252-4529. The author also monitors the SHAREWARE conference in the
Intelec International Network.
Because of the high cost of voice support, and the low cost of GIFtest, voice
support from the author is not available. If it's absolutely important that
you recieve voice support, leave an electronic message to the author on The
TASTE BBS and you will recieve a "collect" call as soon as humanly possible.
---- End Of File ----